package Solution_1;

import java.util.Scanner;

//
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        //String str = "ABCD123!@#$%ab";
        String str;
        str = in.next();

        //y
        int []result = new int[4];
        var upmatch = "[A-Z]";
        var lomatch = "[a-z]";
        var nummatch = "[0-9]";
        String  [] arr = {upmatch,lomatch,nummatch};
        var i = 0;
        while (i < str.length()){
            for (int j = 0;j<arr.length;j++){
               if (str.substring(i,i+1).matches(arr[j])){
                   result[j]++;
                   break;
               }
               if(j==2) result[j+1] ++;
            }
            i++;
        }
        System.out.println("大写字母：" + result[0]);
        System.out.println("小写字母：" + result[1]);
        System.out.println("数字：" + result[2]);
        System.out.println("其他字符：" + result[3]);
    }
}
